package com.example.demo.model;

import java.util.Date;

public class CityImage {
    private Long id;
    private Long cityId;
    private String imageUrl;
    private String caption;
    private Integer sortOrder;
    private Boolean isPrimary;
    private Date createTime;

    public CityImage() {
        this.createTime = new Date();
        this.sortOrder = 0;
        this.isPrimary = false;
    }

    // Getter和Setter方法
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public Long getCityId() { return cityId; }
    public void setCityId(Long cityId) { this.cityId = cityId; }

    public String getImageUrl() { return imageUrl; }
    public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; }

    public String getCaption() { return caption; }
    public void setCaption(String caption) { this.caption = caption; }

    public Integer getSortOrder() { return sortOrder; }
    public void setSortOrder(Integer sortOrder) { this.sortOrder = sortOrder; }

    public Boolean getPrimary() { return isPrimary; }
    public void setPrimary(Boolean primary) { isPrimary = primary; }

    public Date getCreateTime() { return createTime; }
    public void setCreateTime(Date createTime) { this.createTime = createTime; }

    @Override
    public String toString() {
        return "CityImage{" +
                "id=" + id +
                ", cityId=" + cityId +
                ", imageUrl='" + imageUrl + '\'' +
                ", caption='" + caption + '\'' +
                ", sortOrder=" + sortOrder +
                ", isPrimary=" + isPrimary +
                ", createTime=" + createTime +
                '}';
    }
}